﻿@{
    ViewBag.Title = "OStatusUpdate";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    $(function () {
        initControl();
        var keyValue = $.request("keyValue");
        $.ajax({
            url: "/Gas/Apply/GetFormJsonForUpdate",
            data: { keyValue: keyValue },
            dataType: "json",
            async: false,
            success: function (data) {
                //formSerialize 是 framework-ui.js 中的全局函数 作用是绑定数据
                $("#form1").formSerialize(data);
            }
        });
    })
    function initControl() {
        //绑定各种下拉框
        $("#OStatus").bindSelect({
            url: "/SystemManage/ItemsData/GetSelectJson",
            param: { enCode: "studentOStatus" }
        });
        $("#OStatus").bindSelect({
            url: "/SystemManage/ItemsData/GetSelectJson",
            param: { enCode: "schoolOStatus" }
        });
        $("#OStatus").bindSelect({
            url: "/SystemManage/ItemsData/GetSelectJson",
            param: { enCode: "eduOStatus" }
        });

        //select框加入宽度控制
        $("#OStatus").next().addClass("myWidth");
    }
    //保存和提交资料
    function btn_update() {
        var keyValue = $.request("keyValue");
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/Gas/Apply/UpdateOStatusByEdu?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                window.location.href = "/Gas/Apply/ApplyIndex";//教育局报名列表
            }
        })
    }
    //返回前一页
    function btn_back() {
        window.location.href = "/Gas/Apply/ApplyIndex";//教育局报名列表
    }
</script>
<style>
    .myWidth {
        width: 500px !important;
    }

    .titileWidth {
        width: 250px !important;
    }

    .houseSpan {
        font-size: initial;
        color: #fff;
        border-radius: 4px;
        background-color: #1ABC9C;
    }

    .myTable {
        width: 790px !important;
    }

    .buttonOuterDiv {
        width: 600px;
        height: 50px;
        padding-top:20px;
    }

    .buttonInnerLeftDiv {
        width: 100px;
        height: 50px;
        display: inline-block;
        float: left;
        padding-left: 50px;
    }

    .buttonInnerRightDiv {
        width: 100px;
        height: 50px;
        display: inline-block;
        margin-left: 0;
        float: left;
        padding-left: 150px;
    }
</style>
<div class="wrapper">
    <form id="form1" enctype="multipart/form-data">
        <div style="padding-top: 20px; margin-right: 20px;">
            <input id="LastUpdateTime" name="LastUpdateTime" type="hidden" />
            <table class="form myTable">
                <tr>
                    <th class="formTitle titileWidth">学生姓名</th>
                    <td class="formValue">
                        <input id="StudentName" name="StudentName" type="text" class="form-control myWidth" disabled />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">学生身份证号</th>
                    <td class="formValue">
                        <input id="IDNumber" name="IDNumber" type="text" class="form-control myWidth" disabled />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle"></th>
                    <td class="formValue">
                        <textarea class="form-control myWidth" style="color:#FF0000;height:32px" disabled>请据实慎重选择状态。</textarea>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">状态</th>
                    <td class="formValue">
                        <select id="OStatus" name="OStatus" style="height:20px" class="form-control required"></select>
                    </td>
                </tr>
            </table>
            <input type="hidden" id="SchoolId" name="SchoolId" value="" />
            <input type="hidden" id="Class" name="Class" value="" />
        </div>
    </form>
</div>
<div class="layui-layer-btn" style="margin-top:30px">
    <a class="layui-layer-btn0 btn btn-primary" style="margin-left:10px" onclick="btn_update()">确认修改</a>
    <a class="layui-layer-btn1 btn btn-danger" style="margin-left:20px" onclick="btn_back()">返回</a>
</div>